import axios from '../../../plugins/axios'
import { VipActionsEnum } from '../../../_/vue/store/vip'
export default {
  [VipActionsEnum.LIST] ({ commit }, params) {
    return axios.get('/vips', { params })
  },
  [VipActionsEnum.STORE] ({ commit }, data) {
    return axios.post('/vips', data)
  },
  [VipActionsEnum.EDIT] ({ commit }, id) {
    return axios.get(`/vips/${id}`)
  },
  [VipActionsEnum.SAVE] ({ commit }, payload) {
    return axios.post(`/vips/${payload.id}`, payload.data)
  },
  [VipActionsEnum.DELETE] ({ commit }, ids) {
    return axios.delete('/vips', { data: ids })
  },
  [VipActionsEnum.SELECT] ({ commit }) {
    return axios.get('/vips/select')
  }
}
